<!--
 * @Author: una
 * @Date: 2021-12-31 13:06:36
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-01-11 16:46:16
 * @Description: file content
-->
<template>
  <!-- @/assets/loading.svg 该路径经vue-cli打包后会变成绝对地址/img/loading.6cc04d10.svg (打包后的img文件体积太小会变成base64格式) -->
  <img class="loading-container" :src="imgUrl" />
</template>

<script>
// 这么书写后vue-cli打包时，可以将该imgUrl地址编译成绝对地址/img/loading.6cc04d10.svg
// import imgUrl from "@/assets/loading.svg";
export default {
  data() {
    return {
      // 如果将imgUrl作为src属性值的话，vue-cli打包时，不会编译该动态数据，所以最后打包后的地址就是@/assets/loading.svg
      imgUrl:"@/assets/loading.svg",
    };
  },
};
</script>

<style scoped lang="less">
@import "~@/styles/mixin.less";
.loading-container {
  .self-center();
}
</style>